Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory resource definitions #953

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented May 25, 2022

Description of proposed changes

See commit messages.

Related issue(s)

Fixes #949

Testing

  • CI passes
  • Try to evaluate if the mem_mb as defined for rule tree is still accurate, or if we need to revise the definition to provide more memory. Passing --mem to IQ-TREE may make tree building run slower if the current value is insufficient. Graph various input sizes from our builds vs. memory used from benchmark files for this rule?

Release checklist

Changes should not be backwards incompatible.

If this pull request introduces new features, complete the following steps:

  • Update docs/src/reference/change_log.md in this pull request to document these changes by the date they were added.

tsibley added 2 commits May 25, 2022 13:50
Previously they would result in mem_mb=0 when the input size in GiB was
less than 1, as the int() would truncate that to 0 which then was
propagated to the final result by multiplication via the constant
scaling factor.  This only impacted smaller builds, such as our CI, but
good to fix anyway.

Use ceil() instead of int() to ensure that we always at least result in
mem_mb=1 (although almost every process we run is going to have a larger
memory footprint than that in reality, so there's still a bit of
inaccuracy…).
While most of our mem_mb definitions are only heuristics for Snakemake's
scheduler and the commands themselves aren't limited or aware of the
mem_mb defined, IQ-TREE *does* support memory limits.

Resolves <#949>.
@tsibley
Copy link
Member Author

tsibley commented Jun 8, 2022

Another approach to setting a memory limit for the rule (rather than basing it off input size and guessing how much IQ-TREE needs) would be slice up the total memory available to the workflow by the number of concurrent jobs. This would avoid having to keep tabs on the current memory usage in benchmarks and update the rule's resources to match over time.

@tsibley
Copy link
Member Author

tsibley commented Jul 6, 2022

It would be good to merge this, but I'm wary to do so without first completing the review of memory usage correlation with input size (as described under the "Testing" section above). I will likely hold off on merging until that's done (maybe by me eventually, maybe by someone else interested if anyone).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

Memory resource constraints are not passed to IQ-TREE (via augur tree)
1 participant